package design.demos.order.state.impl;

import design.demos.order.enums.StateEnum;
import design.demos.order.bo.Order;
import design.demos.order.service.OrderDataBaseService;
import design.demos.order.state.OrderState;

public class OrderProcessing extends OrderState {
    OrderDataBaseService orderService = new OrderDataBaseService();

    @Override
    public Order orderEnd(Order order) {
        System.out.println("进行中-->已结束 逻辑处理中...");
        order.setState(StateEnum.ORDER_END.value);
        orderService.updateOrder(order);
        return order;
    }
}
